3.1 R Markdown: Introduction

3.2 R Markdwon: Syntax & Code Chunks

End a line with 2 spaces to make new paragraph.
Or specify line break.
italics
bold
superscript2
subscript2
strikethrough
blog

Header1

Header2

Header3

Header4

Header5
Header6

Hacker code

  • Unordered List
  • This list has no order
    • Sub-item 1
    • Sub-item 2
      • Sub-Sub-item 1
      • Sub-Sub-item 2
  1. Ordered List
  2. This list has order
    • Sub-item 1
    • Sub-item 2
      • Sub-Sub-item 1
      • Sub-Sub-item 2

Can dynamically add code:
Iris has 150.

Graphics

Use built-in include_graphics function in knitr package to control size and scale of images.

Equations

Use LaTeX style code to make inline and block equations.
\(A = \pi*r^{2}\) \[A = \pi*r^{2}\]

Tables

Here is an ugly ass table. Don’t forget 2 spaces after each line:

Table Header Second Header Third Header
Table Cell Cell (1, 2) Cell (1, 3)
Cell (2, 1) Cell (2, 2) Cell (2, 3)

Here is a much nicer table.

knitr::kable(summary(cars))
speed dist
Min. : 4.0 Min. : 2.00
1st Qu.:12.0 1st Qu.: 26.00
Median :15.0 Median : 36.00
Mean :15.4 Mean : 42.98
3rd Qu.:19.0 3rd Qu.: 56.00
Max. :25.0 Max. :120.00